<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>主要内容区main</title>
	<style>
		#a{
			position: fixed;
			top: 0px;
			left: 0px;
			right: 0px;
			bottom: 0px;
			margin: auto;
			width: 450px;
			height: 200px;

			position: fixed;
			top: 0px;
			left: 0px;
			right: 0px;
			bottom: 0px;
			margin: auto;
		}
	</style>
</head>
<body >
<div id="a">
	<h1 class="title" id="character" >欢迎进入宿舍管理系统</h1>
</div>


<script type="text/javascript">

    var i=0;
    setInterval('changeColor()',500);
    function changeColor(){
        var div=document.getElementById('character'); //获得div元素
        var colorArr=['#8A2BE2','#DEB887','#7FFF00','#008B8B','#FF1493']; //建立颜色库
        if(i==colorArr.length){
            i=0;
        }else{
            div.style.color=colorArr[i++%colorArr.length]; //循环颜色
        }
    }
</script>
</body>
</html>